﻿using System.Web;
using System.Web.Mvc;

namespace Infrastructure.Crosscutting.NetFramework.Attributes
{
    /// <summary>
    /// 
    /// </summary>
    public class AdminAuthorizeAttribute : AuthorizeAttribute
    {
        /// <summary>
        /// When overridden, provides an entry point for custom authorization checks.
        /// </summary>
        /// <param name="httpContext">The HTTP context, which encapsulates all HTTP-specific information about an individual HTTP request.</param>
        /// <returns>
        /// true if the user is authorized; otherwise, false.
        /// </returns>
        /// <exception cref="T:System.ArgumentNullException">The <paramref name="httpContext"/> parameter is null.</exception>
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            //var permissionService = EngineContext.Current.Resolve<IPermissionService>();
            //permissionService.Authorize(StandardPermissionProvider.AccessAdminPanel);
            bool result = false;
            return result;
        }
    }
}
